@using Resources
@using VocaDb.Model.Service.Search
@using VocaDb.Web.Resources.Domain
@using Res = ViewRes.Search.IndexStrings;

<!-- Song search options -->
<!-- Viewmodel: SongSearchViewModel -->

<div data-bind="visible: showSongSearch, with: songSearchViewModel">
	<div class="control-group">
		<div class="control-label">@Res.SongType</div>
		<div class="controls">
			@SongHelpers.SongTypesDropdownKnockout("songType")
		</div>
	</div>

	<div class="control-group">
		<div class="control-label">@EntryTypeNames.Artist</div>
		<div class="controls" data-bind="with: artistFilters">
			@KnockoutHelpers.ArtistFilters(artistParticipationStatus: true)
		</div>
	</div>

	<div class="control-group">
		<div class="control-label">@Res.MoreRecentThan</div>
		<div class="controls">
			<select data-bind="value: since">
				<option value="">(Show all)</option>
				<option value="24">1 day</option>
				<option value="48">2 days</option>
				<option value="168">7 days</option>
				<option value="336">2 weeks</option>
				<option value="720">1 month</option>
				<option value="4320">6 months</option>
				<option value="8760">1 year</option>
				<option value="17520">2 years</option>
				<option value="26280">3 years</option>
			</select>
		</div>
	</div>

	<div class="control-group">
		<div class="control-label">@Res.MinScore</div>
		<div class="controls">
			<input type="number" data-bind="textInput: minScore" maxlength="10" min="0" class="input-small" />
		</div>
	</div>

	<div class="control-group">
		<div class="control-label">@Res.ReleaseEvent</div>
		<div class="controls">
			@KnockoutHelpers.BasicEntryLinkLockingAutoComplete("releaseEventAutoComplete", "releaseEvent")
		</div>
	</div>
	
	<div class="control-group">
		<div class="control-label">@Res.ReleaseDate</div>
		<div class="controls">
			<input type="number" data-bind="textInput: dateYear" class="input-small" maxlength="4" max="2100" min="1900" placeholder="Year" />
			<input type="number" data-bind="textInput: dateMonth, visible: dateYear" class="input-small" maxlength="2" max="12" min="1" placeholder="Month" />
		</div>
	</div>

	<div class="control-group">
		<div class="control-label"></div>
		<div class="controls">
			@SearchHelpers.AdvancedFilters(AdvancedSearchFilters.SongFilters)
		</div>
	</div>
</div>

